package com.czc.cca.ddl;

import org.zoomdev.zoom.dao.ddl.*;
import org.zoomdev.zoom.dao.driver.mysql.MysqlDriver;

@_DDL_CompoundUniqueGroup({
        @_DDL_CompoundUnique(name = "UNI_usr_id_card_no", columns = {"usr_id", "card_no"})
})
@_DDL_Table(name = "a_card", simpleName = "", engine = MysqlDriver.InnoDB, comment = "卡片账户")
public class _DDL_ACard {

    @_DDL_Primary()
    @_DDL_Column(name = "id", type = SqlType.INT_UNSIGNED, nullable = false, autoIncrement = true, comment = "本地id")
    private Long id;

    @_DDL_Column(name = "card_no", type = SqlType.VARCHAR, size = 20, comment = "卡面号码")
    private String cardNo;

    @_DDL_Column(name = "phy_no", type = SqlType.CHAR, size = 8, comment = "物理卡号")
    private String phyNo;

    @_DDL_Column(name = "state", type = SqlType.TINYINT_UNSIGNED, comment = "状态码 0 正常 1 锁定 2 销毁")
    private Integer state;

    @_DDL_Column(name = "qb_id", type = SqlType.INT, comment = "通道id")
    private Integer qbId;

    @_DDL_Column(name = "remark", type = SqlType.VARCHAR, size = 100, comment = "绑卡备注")
    private String remark;

    @_DDL_Column(name = "ch_type", type = SqlType.TINYINT_UNSIGNED, comment = "渠道类型")
    private Integer chType;

    @_DDL_Column(name = "ch_qb", type = SqlType.VARCHAR, size = 30, nullable = false, comment = "第三方账号")
    private String chQb;

    @_DDL_Column(name = "usr_id", type = SqlType.INT_UNSIGNED, comment = "用户id")
    private Long usrId;

    @_DDL_Column(name = "cr_time", type = SqlType.TIMESTAMP, defaultFunction = MysqlDriver.CURRENT_TIMESTAMP, comment = "绑定时间")
    private java.sql.Timestamp crTime;

}
